package com.cz.basetool.ui_work.util.exception;

/**
 * Created by 陈章 on 2017/12/17.
 * 显示异常信息
 */

public class ExceptionHandler {
//    public static void show(String TAG, String tip, Exception e){
//        AndroidConsoleLogPrinter.e(TAG,tip + e.getMessage());
//    }

 /*   public static void show(final BaseActivity activity, final String tip, final Exception e){
        CZLocalLogPrinter.getInstance().writeLog("error", tip + ":" + e.getMessage());

        activity.onHideProgressDialog();
        activity.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                 ToastUtil.longT(activity,tip + ":" + e.getMessage());
            }
        });
        CZLocalLogPrinter.e(activity.TAG,tip + e.getMessage());
    }

    public static void show(final BaseActivity activity, final String tip, final Exception e, CommonCallback commonCallback){
        CZLocalLogPrinter.getInstance().writeLog("error", tip + ":" + e.getMessage());

        activity.onHideProgressDialog();
        activity.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                ToastUtil.longT(activity,tip + ":" + e.getMessage());
            }
        });
        CZLocalLogPrinter.e(activity.TAG,tip + e.getMessage());
        if(commonCallback != null){
            commonCallback.onError(new Exception(tip + e.getMessage()));
        }

    }*/


}
